package com.ding.state;

/*
 * @author ding
 * @date 2021/10/27 16:50:32
 */

public class Context {

    private State state;

    public void setState(State state) {
        this.state = state;
        this.state.context=this;
    }
    public State getState(){
        return this.state;
    }

    public void stop(){
        state.stop();
    }
    public void rise(){
        state.rise();
    }
    public void down(){
        state.down();
    }
    public void openDoor(){
        state.openDoor();
    }
    public void closeDoor(){
        state.closeDoor();
    }
}
